<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Home extends CI_Controller {
	 
	function __construct()
	{
		parent::__construct();
		if(! $this->session->userdata('login'))
			redirect(site_url('entrance'));
		//更新活跃时间
		$this->user->active();
	}
	 
	public function index()
	{
		$a['info']=$this->user->get_info();
		
		$this->load->view('home/home',$a);
	}
	
	public function msg()
	{
		$this->load->view('home/msg');
	}
	
	public function get_user_info()
	{
		$a['info']=$this->user->get_info();
		if (! $a['info'])
		{
			$a['err_msg']=$this->user->get_err_msg();
			$a['err_code']=$this->user->get_err_code();
			$this->load->view('home/home',$a);
		}
		else
		{
			$this->load->view('home/home',$a);
		}
	}
	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */